<?php

/**
 * This is the model class for table "product".
 *
 * The followings are the available columns in table 'product':
 * @property integer $id
 * @property string $model
 * @property string $name
 * @property integer $category
 * @property string $image
 * @property string $image_thumb
 * @property string $highlight
 * @property string $overview
 * @property string $features
 * @property string $specifications
 * @property string $downloads
 *
 * The followings are the available model relations:
 * @property Category $category0
 */
class UpdateProduct extends Product
{
        /**
	 * Returns the static model of the specified AR class.
	 * @param string $className active record class name.
	 * @return Product the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}
	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
                        array('file','file','types'=>'jpg, gif, png','allowEmpty'=>true),
			array('model, name, category, highlight, overview, features, specifications', 'required'),
			array('category', 'numerical', 'integerOnly'=>true),
			array('model', 'length', 'max'=>100),
			array('name, image, image_thumb', 'length', 'max'=>255),
			array('downloads', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, model, name, category, image, image_thumb, highlight, overview, features, specifications, downloads', 'safe', 'on'=>'search'),
		);
	}

}